package cn.hackcloud.designpattern.composite;

public class Client {
	public static void main(String[] args) {
		OrganizationComponent university=new University("清华大学", "985 211");
		
		OrganizationComponent college1 = new College("计算机学院", "搞电脑的");
		OrganizationComponent college2 = new College("信息工程学院", "搞信息的");
		
		OrganizationComponent computer1 = new Department("计算机科学与技术", "");
		OrganizationComponent computer3 = new Department("软件工程", "软件工程");
		college1.add(computer1);
		college1.add(computer3);
		
		OrganizationComponent infomation1 = new Department("信息工程", "信息工程");
		OrganizationComponent infomation2 = new Department("网络工程", "网络工程");
		college2.add(infomation1);
		college2.add(infomation2);
		
		university.add(college1);
		university.add(college2);
		university.print();
	}
}
